package com.hserver.action;

import cn.hserver.plugin.web.annotation.Controller;
import cn.hserver.plugin.web.annotation.GET;
import com.hserver.service.UserService;
import com.simonalong.neo.NeoMap;
import cn.hserver.core.ioc.annotation.Autowired;

import java.util.List;

@Controller
public class UserAction {

    @Autowired
    private UserService userService;

    @GET("/count")
    public String getUserCount(){
        return "大小："+userService.getUserCount();
    }

    @GET("/set")
    public String setUser(){
        userService.setUser();
        return "ok";
    }
    @GET("/getUser")
    public List<NeoMap> getUser(){

        return userService.getUser();

    }

}
